// import request from '@/utils/request.js'
import request from '@/utils/mgop'

// 基地列表
export function GetBaseList(params) {
  return request({ api: 'mgop.hp.reduce.base', type: 'GET', data: params })
}

// 创建基地
export function AddBaseInfo(data) {
  return request({ api: 'mgop.hp.reduce.baseApply', type: 'POST', data })
}
// 获取基地详情
export function GetBaseInfo(id) {
  return request({ api: 'mgop.hp.reduce.baseInfo', type: 'GET', data: { id } })
}
// 获取基地类型
export function GetBaseType() {
  return request({ api: 'mgop.hp.reduce.baseType', type: 'GET' })
}

// 团队预约
export function AppointmentTeamBase(id, data) {
  return request({
    api: 'mgop.hp.reduce.baseAppointmentTeam',
    type: 'POST',
    data: { ...data, id }
  })
}
// 个人预约
export function AppointmentSelfBase(id, data) {
  return request({
    api: 'mgop.hp.reduce.baseAppointmentPersonal',
    type: 'POST',
    data: { ...data, id }
  })
}
// 剩余人数
export function surplusPersonNum(id, date) {
  return request({
    api: 'mgop.hp.reduce.baseQuota',
    type: 'GET',
    data: { appointment_date: date, id }
  })
}
